package com.itheima.d5_resource;

public class Test1 {
    public static void main(String[] args) {
        try {
            System.out.println(10/2);
        }catch (Exception e){
            e.printStackTrace();
        }finally {
            System.out.println("============finally执行了一次===================");
        }
        System.out.println(chu(10, 0));
    }

    public static int chu(int a,int b){
        try {
            return a/b;
        }catch (Exception e){
            e.printStackTrace();
            return -1;
        }finally {
            //如果try里面有返回，finally一定不要有return！！！
            //return 111;
        }
    }
}
